package fi.saarinen.simulator.instructions;

import fi.saarinen.simulator.Instruction;
import fi.saarinen.simulator.M68000Context;

public class MoveQ implements Instruction
{
  /*
  MOVE signed 8-bit data Quick

  NAME
    MOVEQ -- Move signed 8-bit data quick

  SYNOPSIS
    MOVEQ #<data:8>,Dn

    Size = (Long)

  FUNCTION
    Move signed 8-bit data to the specified data register.
    The specified data is sign extended to 32-bits before
    it is moved to the register.

  FORMAT
    -----------------------------------------------------------------
    |15 |14 |13 |12 |11 |10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
    |---|---|---|---|-----------|---|-------------------------------|
    | 0 | 1 | 1 | 1 | REGISTER  | 0 |        IMMEDIATE DATA         |
    -----------------------------------------------------------------

    "REGISTER" is one of the 8 datas registers. 

  RESULT
    X - Not affected.
    N - Set if the result is negative. Cleared otherwise.
    Z - Set if the result is zero. Cleared otherwise.
    V - Always cleared.
    C - Always cleared.

  SEE ALSO
    MOVE  MOVEA LEA
    */
   
  public int execute(M68000Context context, int opcode, int programCounter)
  {
    int registerNumber = Util.extractBits(opcode, 11, 9);
    int immediateData = Util.extractBits(opcode, 7, 0);
    return 0;
  }  
}
